<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Userprofile extends CI_Controller {

	public function index()
	{	
		 //Userprofile page
		 $this->load->model('transaction');
		 //if(isset($_COOKIE['mobtel'])) $mobtel = $_COOKIE['mobtel'];
		 //$mobtel = ($mobtel!="") ? urldecode($mobtel) : "";
		 //$userProfile = $this->transaction->retrieveUserProfileToDB($mobtel);
		$subsId = (isset($_COOKIE['subsId'])) ? $_COOKIE['subsId'] : "";
		//$subsId = ($subsId!="") ? urldecode($subsId) : "";
		$userProfile = $this->transaction->retrieveUserProfileToDB($subsId);
		 
		 $d['userinfo'] = $userProfile;		 
		 $views['_content'] = "userprofile";
		 $this->template->load('template_landing', $views, $d);
	}	
	
}
